package com.basic.meiju;

public class MySeasonEnum {
    private String name;
    private String characteristic; // 特点

//    对外界暴露  四个固有对象 —— 春夏秋冬
    public static final MySeasonEnum SPRING = new MySeasonEnum("春天", "鸟女花香");
    public static final MySeasonEnum SUMMER = new MySeasonEnum("夏天", "烈日炎炎");
    public static final MySeasonEnum AUTUMN = new MySeasonEnum("秋天", "秋高气爽");
    public static final MySeasonEnum WINTER = new MySeasonEnum("冬天", "鹅毛大雪");

   // 构造器私有化 -> 这样外界就不能直接创造对象 -> 防止直接new 对象
    private MySeasonEnum () {}

    private MySeasonEnum(String name, String characteristic) {
        this.name = name;
        this.characteristic = characteristic;
    }

    public String getName() {
        return name;
    }

    public String getCharacteristic() {
        return characteristic;
    }

    @Override
    public String toString() {
        return "MySeasonEnum{" +
                "name='" + name + '\'' +
                ", characteristic='" + characteristic + '\'' +
                '}';
    }
}
